Integrand size = 13, antiderivative size = 45 \[ \int \frac {\csc ^2(x)}{(a+a \sin (x))^2} \, dx=\frac {2 \text {arctanh}(\cos (x))}{a^2}-\frac {10 \cot (x)}{3 a^2}+\frac {2 \cot (x)}{a^2 (1+\sin (x))}+\frac {\cot (x)}{3 (a+a \sin (x))^2} \]
[Out]
Time = 0.10 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {2845, 3057, 2827, 3852, 8, 3855} \[ \int \frac {\csc ^2(x)}{(a+a \sin (x))^2} \, dx=\frac {2 \text {arctanh}(\cos (x))}{a^2}-\frac {10 \cot (x)}{3 a^2}+\frac {2 \cot (x)}{a^2 (\sin (x)+1)}+\frac {\cot (x)}{3 (a \sin (x)+a)^2} \]
[In]
[Out]
Rule 8
Rule 2827
Rule 2845
Rule 3057
Rule 3852
Rule 3855
Rubi steps \begin{align*} \text {integral}& = \frac {\cot (x)}{3 (a+a \sin (x))^2}+\frac {\int \frac {\csc ^2(x) (4 a-2 a \sin (x))}{a+a \sin (x)} \, dx}{3 a^2} \\ & = \frac {2 \cot (x)}{a^2 (1+\sin (x))}+\frac {\cot (x)}{3 (a+a \sin (x))^2}+\frac {\int \csc ^2(x) \left (10 a^2-6 a^2 \sin (x)\right ) \, dx}{3 a^4} \\ & = \frac {2 \cot (x)}{a^2 (1+\sin (x))}+\frac {\cot (x)}{3 (a+a \sin (x))^2}-\frac {2 \int \csc (x) \, dx}{a^2}+\frac {10 \int \csc ^2(x) \, dx}{3 a^2} \\ & = \frac {2 \text {arctanh}(\cos (x))}{a^2}+\frac {2 \cot (x)}{a^2 (1+\sin (x))}+\frac {\cot (x)}{3 (a+a \sin (x))^2}-\frac {10 \text {Subst}(\int 1 \, dx,x,\cot (x))}{3 a^2} \\ & = \frac {2 \text {arctanh}(\cos (x))}{a^2}-\frac {10 \cot (x)}{3 a^2}+\frac {2 \cot (x)}{a^2 (1+\sin (x))}+\frac {\cot (x)}{3 (a+a \sin (x))^2} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(166\) vs. \(2(45)=90\).
Time = 0.92 (sec) , antiderivative size = 166, normalized size of antiderivative = 3.69 \[ \int \frac {\csc ^2(x)}{(a+a \sin (x))^2} \, dx=\frac {\left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right ) \left (4 \sin \left (\frac {x}{2}\right )-2 \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right )+28 \sin \left (\frac {x}{2}\right ) \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right )^2-3 \cot \left (\frac {x}{2}\right ) \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right )^3+12 \log \left (\cos \left (\frac {x}{2}\right )\right ) \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right )^3-12 \log \left (\sin \left (\frac {x}{2}\right )\right ) \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right )^3+3 \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right )^3 \tan \left (\frac {x}{2}\right )\right )}{6 (a+a \sin (x))^2} \]
[In]
[Out]
Time = 0.54 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.24
method | result | size |
default | \(\frac {\tan \left (\frac {x}{2}\right )-\frac {8}{3 \left (\tan \left (\frac {x}{2}\right )+1\right )^{3}}+\frac {4}{\left (\tan \left (\frac {x}{2}\right )+1\right )^{2}}-\frac {12}{\tan \left (\frac {x}{2}\right )+1}-\frac {1}{\tan \left (\frac {x}{2}\right )}-4 \ln \left (\tan \left (\frac {x}{2}\right )\right )}{2 a^{2}}\) | \(56\) |
parallelrisch | \(\frac {\left (-12 \cos \left (2 x \right )+12\right ) \ln \left (\csc \left (x \right )-\cot \left (x \right )\right )+\left (20 \tan \left (x \right )-25\right ) \cos \left (2 x \right )+25-20 \left (\tan ^{3}\left (x \right )\right )+8 \left (\tan ^{2}\left (x \right )\right ) \sec \left (x \right )+\left (12 \left (\sec ^{2}\left (x \right )\right )+24 \sin \left (x \right )-20\right ) \tan \left (x \right )}{6 a^{2} \left (-1+\cos \left (2 x \right )\right )}\) | \(73\) |
norman | \(\frac {-\frac {1}{2 a}+\frac {\tan ^{5}\left (\frac {x}{2}\right )}{2 a}-\frac {25 \tan \left (\frac {x}{2}\right )}{3 a}-\frac {31 \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{2 a}-\frac {19 \left (\tan ^{3}\left (\frac {x}{2}\right )\right )}{2 a}}{a \tan \left (\frac {x}{2}\right ) \left (\tan \left (\frac {x}{2}\right )+1\right )^{3}}-\frac {2 \ln \left (\tan \left (\frac {x}{2}\right )\right )}{a^{2}}\) | \(78\) |
risch | \(-\frac {4 \left (-11 \,{\mathrm e}^{2 i x}+9 i {\mathrm e}^{3 i x}+5-12 i {\mathrm e}^{i x}+3 \,{\mathrm e}^{4 i x}\right )}{3 \left ({\mathrm e}^{2 i x}-1\right ) \left ({\mathrm e}^{i x}+i\right )^{3} a^{2}}-\frac {2 \ln \left ({\mathrm e}^{i x}-1\right )}{a^{2}}+\frac {2 \ln \left ({\mathrm e}^{i x}+1\right )}{a^{2}}\) | \(84\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 168 vs. \(2 (41) = 82\).
Time = 0.29 (sec) , antiderivative size = 168, normalized size of antiderivative = 3.73 \[ \int \frac {\csc ^2(x)}{(a+a \sin (x))^2} \, dx=-\frac {10 \, \cos \left (x\right )^{3} - 4 \, \cos \left (x\right )^{2} - 3 \, {\left (\cos \left (x\right )^{3} + 2 \, \cos \left (x\right )^{2} + {\left (\cos \left (x\right )^{2} - \cos \left (x\right ) - 2\right )} \sin \left (x\right ) - \cos \left (x\right ) - 2\right )} \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) + 3 \, {\left (\cos \left (x\right )^{3} + 2 \, \cos \left (x\right )^{2} + {\left (\cos \left (x\right )^{2} - \cos \left (x\right ) - 2\right )} \sin \left (x\right ) - \cos \left (x\right ) - 2\right )} \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) - {\left (10 \, \cos \left (x\right )^{2} + 14 \, \cos \left (x\right ) + 1\right )} \sin \left (x\right ) - 13 \, \cos \left (x\right ) + 1}{3 \, {\left (a^{2} \cos \left (x\right )^{3} + 2 \, a^{2} \cos \left (x\right )^{2} - a^{2} \cos \left (x\right ) - 2 \, a^{2} + {\left (a^{2} \cos \left (x\right )^{2} - a^{2} \cos \left (x\right ) - 2 \, a^{2}\right )} \sin \left (x\right )\right )}} \]
[In]
[Out]
\[ \int \frac {\csc ^2(x)}{(a+a \sin (x))^2} \, dx=\frac {\int \frac {\csc ^{2}{\left (x \right )}}{\sin ^{2}{\left (x \right )} + 2 \sin {\left (x \right )} + 1}\, dx}{a^{2}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 126 vs. \(2 (41) = 82\).
Time = 0.20 (sec) , antiderivative size = 126, normalized size of antiderivative = 2.80 \[ \int \frac {\csc ^2(x)}{(a+a \sin (x))^2} \, dx=-\frac {\frac {41 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {69 \, \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac {39 \, \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} + 3}{6 \, {\left (\frac {a^{2} \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {3 \, a^{2} \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac {3 \, a^{2} \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} + \frac {a^{2} \sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}}\right )}} - \frac {2 \, \log \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{a^{2}} + \frac {\sin \left (x\right )}{2 \, a^{2} {\left (\cos \left (x\right ) + 1\right )}} \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.53 \[ \int \frac {\csc ^2(x)}{(a+a \sin (x))^2} \, dx=-\frac {2 \, \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right )}{a^{2}} + \frac {\tan \left (\frac {1}{2} \, x\right )}{2 \, a^{2}} + \frac {4 \, \tan \left (\frac {1}{2} \, x\right ) - 1}{2 \, a^{2} \tan \left (\frac {1}{2} \, x\right )} - \frac {2 \, {\left (9 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 15 \, \tan \left (\frac {1}{2} \, x\right ) + 8\right )}}{3 \, a^{2} {\left (\tan \left (\frac {1}{2} \, x\right ) + 1\right )}^{3}} \]
[In]
[Out]
Time = 5.93 (sec) , antiderivative size = 91, normalized size of antiderivative = 2.02 \[ \int \frac {\csc ^2(x)}{(a+a \sin (x))^2} \, dx=\frac {\mathrm {tan}\left (\frac {x}{2}\right )}{2\,a^2}-\frac {13\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3+23\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+\frac {41\,\mathrm {tan}\left (\frac {x}{2}\right )}{3}+1}{2\,a^2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^4+6\,a^2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3+6\,a^2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+2\,a^2\,\mathrm {tan}\left (\frac {x}{2}\right )}-\frac {2\,\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )}{a^2} \]
[In]
[Out]